package com.spddr.pmos.cxf.tree.impl;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;


import org.springframework.stereotype.Service;

import com.spddr.pmos.cxf.tree.JaxrsPsrTree;
import com.spddr.pmos.jpa.River;

import cn.seqdata.pojo.TreeNode;

@Service
public class JaxrsPsrTreeImpl extends AbstractTreeImpl implements JaxrsPsrTree {
	@Override
	public Collection<TreeNode> byRoot() {
		List<TreeNode> nodes = new ArrayList<>();
		River river = riverRepos.findOne(1L);
		nodes.addAll(byJpaObject(true, Arrays.asList(river)));
		return nodes;
	}
}
